package com.chen.dal.dateobject.dept;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chen.core.dal.BaseDO;
import com.chen.enums.CommonStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 部门表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("system_dept")
@EqualsAndHashCode(callSuper = true)
public class DeptDO extends BaseDO {
    /**
     * 表的主键id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 部门名字
     */
    @TableField(value = "name")
    private String name;
    /**
     * 父亲部门的id
     *
     */
    @TableField(value = "parent_id")
    private Long parentId;
    /**
     * 排序字段
     */
    @TableField(value = "sort")
    private Integer sort;
    /**
     * 部门负责人id
     * //建立连接
     */
    @TableField(value = "leader_user_id")
    private Long leaderUserId;
    /**
     * 部门电话号码
     */
    @TableField(value = "phone")
    private String phone;
    /**
     * 部门的邮箱
     */
    @TableField(value = "email")
    private String email;
    /**
     * 部门状态是否存在
     * {@link CommonStatus}
     */
    @TableField(value = "status")
    private Integer  status;
}
